package com.example.io;
/*
* 拷贝文件
*
* */

import java.io.FileInputStream;

import java.io.FileOutputStream;
import java.io.IOException;

public class Test01 {
    public static void main(String[] args) throws IOException {

        FileInputStream inputStream = new FileInputStream("D:\\27162\\Desktop\\itheima\\untitled2\\girl.jpg");
        FileOutputStream outputStream = new FileOutputStream("D:\\27162\\Desktop\\itheima\\untitled2\\copy.jpg");
        int b;
        byte[] bytes=new byte[1024*5];
        while ((b = inputStream.read(bytes))!=-1){
            outputStream.write(bytes,0,b);
        }
        outputStream.close();
        inputStream.close();
    }
}
